package com.adee.gulimall.product.app;

import com.adee.gulimall.util.utils.R;
import com.adee.gulimall.product.feign.WareFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product/test")
public class TestController {
    @Autowired
    WareFeignService wareFeignService;

    @GetMapping("/sku/stock/{skuid}")
    public R<Integer> skuStock(@PathVariable long skuid) {
        R<Integer> r = wareFeignService.skuStock(skuid);
        return r;
    }
}
